package com.magnificent.panda;

import com.jgoodies.looks.plastic.PlasticXPLookAndFeel;
import com.magnificent.graph.util.mxConstants;
import com.magnificent.panda.resources.Resources;
import com.magnificent.panda.settings.Settings;
import com.magnificent.panda.ui.GraphEditor;
import com.magnificent.panda.ui.editor.EditorMenuBar;
import com.magnificent.panda.utils.ExceptionHandler;
import com.silverhaze.commons.utils.resource.ResourceAllocator;

import javax.swing.*;
import java.awt.*;

/**
 * User: Babanin
 * Date: 24.02.2010
 * Time: 10:41:15
 */
public class MainLoad {
    public static void main(String[] args) {
        initialize();
        initializeUI();
    }

    private static void initialize() {
        Settings.getInstance();
        ResourceAllocator.addResourceLocationClass(Resources.class);
        Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler());
    }

    private static void initializeUI() {
        try {
            UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
        } catch (Exception e) {
            e.printStackTrace();
        }

        mxConstants.SHADOW_COLOR = Color.LIGHT_GRAY;
        GraphEditor editor = new GraphEditor();
        editor.createFrame(new EditorMenuBar(editor)).setVisible(true);
    }
}
  /* converted to utf8 */